Skip to content

Add Android Auto vehicle dynamics collector with COVESA VSS integration#1

Draft
Copilot wants to merge 5 commits intomainfrom
copilot/add-android-auto-capabilities
Draft

Add Android Auto vehicle dynamics collector with COVESA VSS integration#1
Copilot wants to merge 5 commits intomainfrom
copilot/add-android-auto-capabilities

Conversation

Copy link
Copy Markdown

Copilot AI commented Dec 30, 2025

Built from scratch: Android app for vehicle dynamics data collection using smartphone sensors, with Android Auto head unit integration for safe in-vehicle operation. Implements COVESA Vehicle Signal Specification (VSS) data models for standardized vehicle telemetry.

Architecture

Core Components

  • SensorDataCollector: Manages accelerometer, gyroscope, GPS; streams VSS-compliant data at 1Hz
  • VSSDataModel: COVESA-compliant data classes (Vehicle.Speed, Vehicle.Acceleration, Vehicle.CurrentLocation, Vehicle.AngularVelocity)
  • VehicleDynamicsCarAppService: Android Auto service with distraction-optimized UI
  • MainActivity: Phone UI with real-time monitoring and session management

Data Flow

// VSS-compliant sensor data structure
VSSVehicle(
  speed = VSSSpeed(value = 60.5, unit = "km/h"),
  acceleration = VSSAcceleration(
    longitudinal = 2.3,  // m/s²
    lateral = 0.1,
    vertical = -9.8
  ),
  position = VSSPosition(lat, lon, alt, heading, speed),
  angularVelocity = VSSAngularVelocity(roll, pitch, yaw)  // degrees/s
)

Implementation Details

COVESA VSS Compliance

  • Hierarchical signal naming (Vehicle.*)
  • Standard units (km/h, m/s², degrees/s)
  • JSON format compatible with VSS tools
  • Extensible for additional signals (OBD-II, CAN bus)

Android Auto Integration

  • CarAppService with Pane-based UI
  • Broadcast-based IPC between phone and head unit
  • ALLOW_ALL_HOSTS_VALIDATOR with production security warning
  • Compatible with Desktop Head Unit (DHU) testing

API Compatibility

  • Min SDK 28, Target SDK 34
  • Conditional RECEIVER_NOT_EXPORTED registration for API 33+
  • Kotlin math functions over Java Math
  • FusedLocationProviderClient with permission error logging

Session Management

  • UUID-based session identification
  • Automatic JSON serialization to external storage
  • Time-series sample collection with millisecond timestamps

Build System

Gradle 8.2 with Android Gradle Plugin 8.1.0. Dependencies:

  • AndroidX Car App Library 1.4.0
  • Play Services Location 21.0.1
  • Gson 2.10.1
./gradlew assembleDebug  # Outputs to app/build/outputs/apk/debug/

Documentation

  • GETTING_STARTED.md: Setup, DHU testing, troubleshooting
  • COVESA_VSS.md: VSS signal definitions, ecosystem integration, KUKSA.val examples
  • IMPLEMENTATION_SUMMARY.md: Technical specifications, future extensions

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -Xmx2048m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

I have this idea for an Android App which leverages all the sensors available in a smartphone to perform vehicle dynamics data collection and analysis.

I'd like to start with a very basic MVP: my own Android apk with Android Auto capabilities. These are important to control the data collection campaigns properly while driving.

Also, I'd like to implement concepts from COVESA initiative (software defined vehicles, etc.), like https://github.com/COVESA/vehicle_signal_specification


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits December 30, 2025 12:24
Co-authored-by: j-almenara-r <246562873+j-almenara-r@users.noreply.github.com>
Co-authored-by: j-almenara-r <246562873+j-almenara-r@users.noreply.github.com>
Co-authored-by: j-almenara-r <246562873+j-almenara-r@users.noreply.github.com>
Co-authored-by: j-almenara-r <246562873+j-almenara-r@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Android Auto capabilities for vehicle data collection Add Android Auto vehicle dynamics collector with COVESA VSS integration Dec 30, 2025
Copilot AI requested a review from j-almenara-r December 30, 2025 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants